package villa.tools.mq.views;


import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.TabFolder;

import villa.tools.mq.preferences.MensajesSave;
import villa.tools.mq.preferences.Propiedades;




class PrincipalApp{
	
	private TabFolder tf = null;
	
	public void setLayout(FormData formData)
	{
		this.tf.setLayoutData(formData);
		
	}
	public PrincipalApp(Composite parent, Display d) {
		
		
		try {
			Propiedades.getInstancia().PropiedadesUsers();
			MensajesSave.getInstancia().PropiedadesUsers();
						
			FormData formData = null;
		    formData = new FormData();
			formData.top = new FormAttachment(0, 0);
			formData.left = new FormAttachment(0, 0);
			formData.right = new FormAttachment(100, 0);
			formData.height = 40;
		    ToolBarApp toolbarapp = new ToolBarApp(parent, d);
		    toolbarapp.setLayout(formData);
		    
		    formData = new FormData();
			formData.top = new FormAttachment(toolbarapp.getToolBar(), 0);
			formData.left = new FormAttachment(0, 0);
			formData.right = new FormAttachment(100, 0);
			formData.bottom = new FormAttachment(100, 0);
			tf = new TabFolder(parent, SWT.NONE);
			tf.setLayoutData(formData);
			toolbarapp.setTab(tf);
			Actions.loadActionF(tf);
		    			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}

